
// const { Sequelize, DataTypes } = require("sequelize");
const { STRING, INTEGER } = require('../types')

module.exports = (sequelize) => {
  const expense = sequelize.define(
    'expense',
    {// 在这里定义模型属性
      id: {
        type: INTEGER,
        primaryKey:true,
        autoIncrement:true,
        allowNull:false
      },
      no: { // 报销编号
        type: STRING,
      },
      idCardPics: { // 身份证正反面照片
        type: STRING,
      },
      bloodCardPic: { // 献血证照片
        type: STRING,
      },
      name: { // 献血者姓名
        type: STRING,
      },
      cardNo: { // 身份证号
        type: STRING,
      },
      phone: { // 手机号
        type: STRING,
      },
      useName: { // 用血者姓名
        type: STRING,
      },
      useHospital: { // 就诊医院
        type: STRING,
      },
      useCardNo: { // 身份证号
        type: STRING,
      },
      useZYH: {
        type: STRING,
      },
      usePhone: {
        type: STRING,
      },
      hospitalLocation: {
        type: STRING,
      },
      invoice: {
        type: STRING,
      },
      invoicePic: {
        type: STRING,
      },
      invoiceRecord: {
        type: STRING,
      },
      yibao: {
        type: STRING,
      },
      outRecord: {
        type: STRING,
      },
      bankCardPics: {
        type: STRING,
      },
      bankCardNo: {
        type: STRING,
      },
      bankCardUserName: {
        type: STRING,
      },
      bankCardNameno: {
        type: STRING,
      },
      bankPhone: {
        type: STRING,
      },
      bankName: {
        type: STRING,
      },
      type: {
        type: STRING,
      },
      relationship: {
        type: STRING,
      },
      relationshipPics: {
        type: STRING,
      },
      status: {
        type: STRING,
      },
      createTime: {
        type: STRING,
      },
      hyrName: {
        type: STRING,
      },
      hyrPhone: {
        type: STRING,
      },
      remark: {
        type: STRING,
      },
    },
    {
    tableName: "expense",//直接提供表名
    timestamps: false
   }
  );
  return expense
}
